import React from 'react'




import  HomeHotUI from './HomeHotUI'

import  api from '../../../api/index'

// console.log(api)
let {homehot1Data,homehot2Data}=api.homehot

// console.log(homehot1Data)




export default class HomeHot extends React.Component {

    constructor(props){
        super(props)
        this.state={
            homehot1:[],
            homehot2:[]
        }
    }

    componentDidMount(){
        console.log(homehot1Data)
        homehot1Data().then(result=>{
            console.log(result)
            this.setState({
                homehot1:result
            })
        })

        homehot2Data().then(result=>{
            console.log(result)
            this.setState({
                homehot2:result
            })
        })


    }



   
    render() {
        let {homehot1 ,homehot2}=this.state
        return (
            <div>
               <HomeHotUI  data={homehot1} title='男人抢手商品'/> 

               <HomeHotUI   data={homehot2}  title='女人抢手商品'/> 


            </div>

        )
    }
}
